<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
    <link rel="stylesheet" href="http://www.petercorke.com/RVC/common/toolboxhelp.css">
    <title>M-File Help: rpy2r</title>
  </head>
  <body>
  <table border="0" cellspacing="0" width="100%">
    <tr class="subheader">
      <td class="headertitle">M-File Help: rpy2r</td>
      <td class="subheader-left"><a href="matlab:open rpy2r">View code for rpy2r</a></td>
    </tr>
  </table>
<h1>rpy2r</h1><p><span class="helptopic">Roll-pitch-yaw angles to rotation matrix</span></p><p>
<strong>R</strong> = <span style="color:red">rpy2r</span>(<strong>rpy</strong>, <strong>options</strong>) is an orthonormal rotation matrix equivalent to the
specified roll, pitch, yaw angles which correspond to rotations about the
X, Y, Z axes respectively. If <strong>rpy</strong> has multiple rows they are assumed to
represent a trajectory and <strong>R</strong> is a three dimensional matrix, where the last index
corresponds to the rows of <strong>rpy</strong>.

</p>
<p>
<strong>R</strong> = <span style="color:red">rpy2r</span>(<strong>roll</strong>, <strong>pitch</strong>, <strong>yaw</strong>, <strong>options</strong>) as above but the roll-pitch-yaw angles
are passed as separate arguments. If <strong>roll</strong>, <strong>pitch</strong> and <strong>yaw</strong> are column vectors
they are assumed to represent a trajectory and <strong>R</strong> is a three dimensional matrix,
where the last index corresponds to the rows of <strong>roll</strong>, <strong>pitch</strong>, <strong>yaw</strong>.

</p>
<h2>Options</h2>
<table class="list">
  <tr><td style="white-space: nowrap;" class="col1"> 'deg'</td> <td>Compute angles in degrees (radians default)</td></tr>
  <tr><td style="white-space: nowrap;" class="col1"> 'zyx'</td> <td>Return solution for sequential rotations about Z, Y, X axes (Paul book)</td></tr>
</table>
<h2>Note</h2>
<ul>
  <li>In previous releases (<8) the angles corresponded to rotations about ZYX. Many
texts (Paul, Spong) use the rotation order ZYX. This old behaviour can be enabled
by passing the option 'zyx'</li>
</ul>
<h2>See also</h2>
<p>
<a href="matlab:doc tr2rpy">tr2rpy</a>, <a href="matlab:doc eul2tr">eul2tr</a></p>
<hr>

<table border="0" width="100%" cellpadding="0" cellspacing="0">
  <tr class="subheader" valign="top"><td>&nbsp;</td></tr></table>
<p class="copy">&copy; 1990-2012 Peter Corke.</p>
</body></html>